ActiveReports 9 > ActiveReports User Guide > How To > Page Report/RDL Report How To > Create Common Page Reports > Create Top N Report |
A Top N Report displays details for the top results in your report. You can create this report by modifying the SQL query while creating a dataset.
The following steps demonstrate how to create a Top N report. These steps assume that you have already added a Page Report/RDL Report template to your project and connected it to a data source. See Adding an ActiveReport to a Project and Connect to a Data Source for more information.
Select Top N FieldNames From TableName
Note: In the query above TableName refers to the table you want to get from the database. FieldNames and N refer to the fields you want to fetch from the table and the number of records to display from that field. Following is an example of a Top N Report SQL query : Select Top 10 * From Movie |
The following image is an example of a Top N Report displaying top 10 movie records: